1. Field of the Invention
This invention relates generally to semiconductor mass storage systems and methods of operating thereof, and more particularly to digital systems, such as PCs, using nonvolatile memory devices in lieu of conventional hard disk drives and digital cameras using nonvolatile memory devices in lieu of conventional films for storage of large quantities of informational data wherein the information being stored in the nonvolatile memory is organized and aligned in such a way so as to maximize the performance of the digital system.
2. Description of the Prior Art
Computers conventionally use rotating magnetic media for mass storage of documents, data, programs and information. Though widely used and commonly accepted, such hard disk drives suffer from a variety of deficiencies. Because of the rotation of the disk, there is an inherent latency in extracting information from a hard disk drive.
Other problems are especially dramatic in portable computers. In particular, hard disks are unable to withstand many of the kinds of physical shock that a portable computer will likely sustain. Further, the motor for rotating the disk consumes significant amounts of power decreasing the battery life for portable computers.
Solid state memory is an ideal choice for replacing a hard disk drive for mass storage because it can resolve the problems cited above. Potential solutions have been proposed for replacing a hard disk drive with a semiconductor memory. For such a system to be truly useful, the memory must be non-volatile and alterable. The inventors have determined that FLASH memory is preferred for such a replacement.
Similarly, in uses other than PCs, such as digital cameras, solid state memory is employed to maintain the digital information that is collected, such as a picture frame, to replace the films used in conventional cameras. Upon collection of a picture frame or preferably a number of frames, the digital system, which may appear in the form of a card, is inserted in a computer where it may be edited, stored or used in other ways. For such systems, the memory that is used to maintain the picture frames must also be nonvolatile yet alterable; FLASH memory is a viable device for such usage.
Devices manufactured using technologies such as FLASH memory need to be programmed before erasing to improve uniformity amongst all cells. They also have to be verified for successful erase.
One requirement for successfully employing a semiconductor mass storage device in lieu of rotating media hard disk mass storage device or film is that its use must be transparent to the computer's operating system and the user of a system using such a device. In other words, the designer or user of a computer incorporating such a semiconductor mass storage device could simply remove the hard disk and replace it with a semiconductor mass storage device. All presently available commercial software should operate on a system employing such a semiconductor mass storage device without the necessity of any modification.
Conventional computer systems include a mass storage memory facility for storing user information such as data and applications files (user files). In addition to storing such data and applications files, conventional systems also store non-user information in the mass storage memory facility for use by the computer system in controlling the general operation of the computer and its related peripheral systems (system files). In DOS-based systems, such system information includes the boot sector, the FAT tables and the directory information.
Within a flash memory device, the write and erase operation take the most time to perform. Accordingly, it would be advantageous to not have to perform an erase operation every time a system file or a user file is updated. Prior art techniques include writing a user file to other areas of the nonvolatile memory each time it is updated in order to avoid erase operations. This is best illustrated through an example.
FIG. 1 is an example of the organization of user data information in nonvolatile memory unit 100 and a look-up-table 102 preferably stored within a volatile memory unit (not shown) as employed by a prior art system. Look-up-table 102 represents a mapping of Logical Block Addresses (LBAs) to corresponding block addresses within the nonvolatile memory unit 100 wherein the user data file is actually stored. Each LBA identifies the location of a 512 byte (or a sector) portion of the user data file. A block within the nonvolatile memory unit 100 comprises of 16 LBAs and therefore each row of the look-up-table 102 (such is 104, 106, 108, . . . ) includes information regarding the status of a 16-sector block.
Specifically, the block address field 112 in look-up-table 102 specifies the block location within the nonvolatile memory where information identified by LBA values resides. For example, in accordance with the contents of row 104, information identified by LBAs 0-15 correspond to block address 0. A `used` flag field 112 and an `old` flag field 114 identify the state of a block within the nonvolatile memory. The `used` flag field 112, when set to a logic state `1` indicates that the block identified by the corresponding block address 110 of the row in which the `used` flag resides has been written to and is therefore in use, whereas a logic state `0`, as represented by the `used` flag, indicates that the block is available or free to be written. A logic state of `1` represented by the `old` flag 114, indicates that the block addressed by the block address of the corresponding row in which the used flag resides is not to be accessed prior to being erased.
The nonvolatile memory 100 wherein the user files are stored, is organized into blocks, such as Block 0, Block 1, etc. Each such block within the nonvolatile memory is identified by an address represented by the block address field 110 and comprises of 16 sectors. In the example of FIG. 1, Block 0, Block 1 and Block 2 were previously written, as indicated by the state of their corresponding `used` flags in look-up-table 102. In this respect, the information identified by LBAs 0-15, LBAs 16-31 and LBAs 32-47, or at least some of these LBAs, has been written.
In FIG. 2, the example cited above is carried through to illustrate the case where 8 sectors starting from LBA 29 (or `1D` in Hexadecimal notation) is updated with new information. As is obvious to those of ordinary skill in the art, the location in nonvolatile memory 100 wherein LBA 29, for example, was stored, i.e., Block 1, can not be re-written because no erase operations were performed since the last write operation to this location. The information that is to be updated in LBA 29 through 36 then needs to be stored elsewhere, in an available location within the nonvolatile memory 100.
Assuming that the next available location within the nonvolatile memory unit is Block 3, the information identified by LBA 29, 30, and 31 is written to Block 3 of the nonvolatile memory 100 and even though the information identified by LBA 16-28 is not being effected, it is nevertheless moved from Block 1 to Block 3 of the nonvolatile memory 100. This is due to setting the state of Block 1 to where it can be erased. In other words, the information that resided in Block 1 that was not to be accessed is still having to be moved in order to allow erasure of that block. In fact, this is the reason for setting the state of the `old` flag 114 of row 106 in the look-up-table 102 to logic state `1`.
The remainder of the LBA-identified information, i.e. LBA 32-36, is written to the next available block within nonvolatile memory 100, such as Block 4. Information identified by LBA 32-36 is written to sectors 0-4, respectively, of Block 4. Furthermore, since LBA 32-47 in row 108 corresponded to Block 2 previously (see FIG. 1), sectors 5-15 of Block 2 are then moved to like sector locations of Block 4, after which Block 2 may be erased.
Through the above example, illustrated by FIGS. 1 and 2, it should be obvious to those of ordinary skill in the art, that where a user file, whose starting address is LBA 29, is being updated, information from two blocks is moved from one block location to another even though there are only 8 sectors, which is less than the number of sectors in a block, being accessed.
In such prior art techniques, the performance of the system is substantially effected due to the number of write operations included in moving sectors that are not necessarily being accessed, yet belonging to a block where user files are updated. As earlier stated, write operations are time consuming and lead to degradation of system performance as do move operations since a move operation necessarily includes performing write operations. Examples of such prior art systems are provided in earlier-filed U.S. patent applications, Ser. No. 08/527,484, filed Sep. 13, 1995 and entitled "METHOD OF AND ARCHITECTURE FOR CONTROLLING SYSTEM DATA WITH AUTOMATIC WEAR LEVELING IN A SEMICONDUCTOR NON-VOLATILE MASS STORAGE MEMORY" with inventors Petro Estakhri, Mahmud Assar, Robert Reid, and Berhanu Iman and Ser. No. 08/831,266, filed Mar. 31, 1997, entitled "MOVING SECTORS WITHIN A BLOCK OF INFORMATION IN A FLASH MASS STORAGE ARCHITECTURE" with inventors Petro Estakhri, Berhau Iman, and Ali Ganjuei. The disclosures of both of these documents are herein incorporated by reference.
A method and apparatus is therefore needed for updating user files, having various block sizes, that are maintained in nonvolatile memory devices of digital systems, such as PCs and digital cameras, whereby the number of move and therefore write operations is minimized resulting in increased system performance.